<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Iniuriam: /home/etu/v/p1115890/LIF7/EncoreUn/iniuriam/src/objet.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Iniuriam
   &#160;<span id="projectnumber">alpha 1</span>
   </div>
   <div id="projectbrief"> RPG futuriste</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/etu/v/p1115890/LIF7/EncoreUn/iniuriam/src/objet.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="objet_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __objet_h__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __objet_h__</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00006"></a>00006 <span class="preprocessor">#include &lt;assert.h&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include &lt;string.h&gt;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &lt;SDL/SDL.h&gt;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;SDL/SDL_image.h&gt;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="constante_8h.html">constante.h</a>&quot;</span>
<a name="l00011"></a>00011 
<a name="l00020"></a><a class="code" href="structObjet.html">00020</a> <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00021"></a>00021 {
<a name="l00022"></a><a class="code" href="structObjet.html#a98fdd3ee83f21e350c0e766c8f78ec63">00022</a>     <span class="keywordtype">char</span> nom [30];          
<a name="l00023"></a><a class="code" href="structObjet.html#ae2ee478169ceb832093d10f8b2f41f88">00023</a>     <span class="keywordtype">char</span> <a class="code" href="structObjet.html#ae2ee478169ceb832093d10f8b2f41f88">type</a>;              
<a name="l00025"></a><a class="code" href="structObjet.html#ab0d7a0455131213db25ea78c0ff7e0cb">00025</a>     <span class="keywordtype">char</span> <a class="code" href="structObjet.html#ab0d7a0455131213db25ea78c0ff7e0cb">utilite</a>;           
<a name="l00031"></a><a class="code" href="structObjet.html#a6a48f5d6ade947899283e29625bb2e6a">00031</a>     <span class="keywordtype">char</span> <a class="code" href="structObjet.html#a6a48f5d6ade947899283e29625bb2e6a">portee</a>;                
<a name="l00035"></a><a class="code" href="structObjet.html#a69b6128257b6554d2c80709d8d8ff4d2">00035</a>     <span class="keywordtype">char</span> <a class="code" href="structObjet.html#a69b6128257b6554d2c80709d8d8ff4d2">degats</a>;                
<a name="l00039"></a><a class="code" href="structObjet.html#a2518b9afe458e705ccae79470a6be3b1">00039</a>     <span class="keywordtype">char</span> <a class="code" href="structObjet.html#a2518b9afe458e705ccae79470a6be3b1">protection</a>;            
<a name="l00042"></a><a class="code" href="structObjet.html#a808ebcb4fbbcc371d49629d8b228b23e">00042</a>     <span class="keywordtype">char</span> description [150];     
<a name="l00043"></a><a class="code" href="structObjet.html#aedf734e39f704f4ac83a5c758b1926f5">00043</a>     <span class="keywordtype">int</span> <a class="code" href="structObjet.html#aedf734e39f704f4ac83a5c758b1926f5">valeur</a>;                 
<a name="l00045"></a><a class="code" href="structObjet.html#ac92873d16f67b9b096468d8ca5758f47">00045</a>     SDL_Surface* <a class="code" href="structObjet.html#ac92873d16f67b9b096468d8ca5758f47">icon</a>;          
<a name="l00046"></a>00046 } <a class="code" href="structObjet.html">Objet</a>;
<a name="l00047"></a>00047 
<a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a85e5451866ec5eecce7857bda4d02921" title="Preconditions : obj n&#39;a pas déjà été initialisé, 0 &lt;= type &lt;= au nombre max d&#39;objet de Objets...">objInit</a> (<a class="code" href="structObjet.html">Objet</a> *obj, <span class="keyword">const</span> <span class="keywordtype">char</span> type);
<a name="l00053"></a>00053 
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a38425564914a28a8f17eb1f5b71ddce0" title="Preconditions : obj est initialisé   Postconditions : obj est libéré">objLibere</a> (<a class="code" href="structObjet.html">Objet</a>* obj);
<a name="l00059"></a>00059 
<a name="l00064"></a>00064 <span class="keywordtype">char</span> <a class="code" href="objet_8c.html#a43d66abae299bccabaaf656d8d1c891d" title="Preconditions : obj est initialisé   Postconditions : retourne le type d&#39;obj.">getObjetType</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00065"></a>00065 
<a name="l00070"></a>00070 <span class="keywordtype">char</span> <a class="code" href="objet_8c.html#a4164dd939e5f6be03d5bf94885dde573" title="Preconditions : obj est initialisé   Postconditions : retourne l&#39;utilité d&#39;obj.">getObjetUtilite</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00071"></a>00071 
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#acf4ede1243a20581ac4a98f6b774c9da" title="Preconditions : obj est initialisé   Postconditions : copie dans utilite l&#39;utilité d&#39;obj...">getObjetUtiliteNom</a>(<span class="keywordtype">char</span>* utilite, <span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00077"></a>00077 
<a name="l00082"></a>00082 <span class="keywordtype">char</span> <a class="code" href="objet_8c.html#a094962059cea47c8ab7cd20d69bc7716" title="Preconditions : obj est initialisé   Postconditions : retourne la portée d&#39;obj.">getObjetPortee</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00083"></a>00083 
<a name="l00088"></a>00088 <span class="keywordtype">char</span> <a class="code" href="objet_8c.html#abce0256c265edc34c571b8b529d693f2" title="Preconditions : obj est initialisé   Postconditions : retourne la valeur de dégâts d&#39;obj...">getObjetDegats</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00089"></a>00089 
<a name="l00094"></a>00094 <span class="keywordtype">char</span> <a class="code" href="objet_8c.html#a4ec6253ae71604ee2fe0f6d8b75fc2b4" title="Preconditions : obj est initialisé   Postconditions : retourne la valeur de protection d&#39;obj...">getObjetProtection</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00095"></a>00095 
<a name="l00100"></a>00100 <span class="keywordtype">int</span> <a class="code" href="objet_8c.html#a8af4fd7d579ae20205d6db935fe45d28" title="Preconditions : obj est initialisé   Postconditions : retourne la valeur (prix) d&#39;obj.">getObjetValeur</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00101"></a>00101 
<a name="l00106"></a>00106 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a46cf3be45659b0941edf9b691baa1150" title="Preconditions : obj est initialisé ; nom est une chaine de longueur &gt;=30   Postconditions : retourne l...">getObjetNom</a>(<span class="keywordtype">char</span>* nom, <span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00107"></a>00107 
<a name="l00112"></a>00112 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#ab18a94bc117f183747bfeb4efc15e643" title="Preconditions : obj est initialisé, description est une chaine de longueur &gt;=150   Postconditions : co...">getObjetDescription</a>(<span class="keywordtype">char</span>* description, <span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a> *obj);
<a name="l00113"></a>00113 
<a name="l00118"></a>00118 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a9aa1ee3462c1622cda0b23ee32d08c17" title="Preconditions : nom est une chaine de longueur &lt;30   Postconditions : change le nom d&#39;obj pour nom...">setObjetNom</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">char</span>* nom);
<a name="l00119"></a>00119 
<a name="l00124"></a>00124 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a1669c4c2e68c3a6421cc316e78e1e28b" title="Preconditions : /   Postconditions : change la portée d&#39;obj pour portee.">setObjetPortee</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">int</span> portee);
<a name="l00125"></a>00125 
<a name="l00130"></a>00130 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a0a45b57d1ea9cf31029c534a7cab6d5a" title="Preconditions : /   Postconditions : change les degats d&#39;obj pour degats.">setObjetDegats</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">int</span> degats);
<a name="l00131"></a>00131 
<a name="l00136"></a>00136 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a36db39c915b715bd0030b20b825480ae" title="Preconditions : /   Postconditions : change la protection d&#39;obj pour protection.">setObjetProtection</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">int</span> protection);
<a name="l00137"></a>00137 
<a name="l00142"></a>00142 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a871ef28d6fe0d02b058ca78000f45c68" title="Preconditions : /   Postconditions : change l&#39;utilité d&#39;obj pour utilite.">setObjetUtilite</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">int</span> utilite);
<a name="l00143"></a>00143 
<a name="l00148"></a>00148 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a2479ce411a57767d34464a485ed71595" title="Preconditions : /   Postconditions : change la valeur d&#39;obj pour valeur.">setObjetValeur</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">int</span> valeur);
<a name="l00149"></a>00149 
<a name="l00154"></a>00154 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#ae29cc0e2b0191644bedf79a3709e3b42" title="Preconditions : nom est une chaine de longueur &lt;150   Postconditions : change la description d&#39;obj pou...">setObjetDescription</a>(<a class="code" href="structObjet.html">Objet</a>* obj, <span class="keyword">const</span> <span class="keywordtype">char</span>* description);
<a name="l00155"></a>00155 
<a name="l00160"></a>00160 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a1827254703732afacfbddf84fc8c2855" title="Preconditions : obj est initialisé   Postconditions : fixe l&#39;icon d&#39;obj en fonction de sa race...">setObjetIcon</a>(<a class="code" href="structObjet.html">Objet</a>* obj);
<a name="l00161"></a>00161 
<a name="l00166"></a>00166 <span class="keywordtype">int</span> <a class="code" href="objet_8c.html#a7704431bd30c56b00f2f568d9d163fca" title="Preconditions : /   Postconditions : retourne le nombre d&#39;objet dans Objets.txt +3.">getNbObjet</a>();
<a name="l00167"></a>00167 
<a name="l00172"></a>00172 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a95ed72b96f3462e65f2ef27a1000e6c9" title="Preconditions : tabObj n&#39;est pas initialisé   Postconditions : initialise tous les objets dans tabObj...">initialiserTousLesObjets</a>(<a class="code" href="structObjet.html">Objet</a>** tabObj);
<a name="l00173"></a>00173 
<a name="l00178"></a>00178 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a05f25f90c3279f022d265b6dfb01ef6f" title="Preconditions : tabObj est initialisé   Postconditions : libère tabObj.">libererTousLesObjets</a>(<a class="code" href="structObjet.html">Objet</a>** tabObj);
<a name="l00179"></a>00179 
<a name="l00184"></a>00184 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#a07dcebb0f2b8013acffbe8a53c5b7463" title="Preconditions : obj est initialisé   Postconditions : affiche les caractéristiques d&#39;obj dans la cons...">afficherObjet</a>(<span class="keyword">const</span> <a class="code" href="structObjet.html">Objet</a>* obj);
<a name="l00185"></a>00185 
<a name="l00190"></a>00190 <span class="keywordtype">void</span> <a class="code" href="objet_8c.html#abd09e1a0fc90d163c3efadfaf37fb16b" title="Preconditions : fichier1 et fichier2 sont des noms de fichiers accessibles au programme   Postconditi...">copierFichier</a> (<span class="keywordtype">char</span>* fichier1, <span class="keyword">const</span> <span class="keywordtype">char</span>* fichier2);
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Jun 4 2013 08:45:33 for Iniuriam by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
